package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.CompanyCustomGroupingExample.E_COMPANY_IDS;
import static org.jsola.hr.example.CompanyCustomGroupingExample.E_MODULE_CODE;
import static org.jsola.hr.example.CompanyCustomGroupingExample.E_MONTHLY;
import static org.jsola.hr.example.CompanyCustomGroupingExample.E_NAME;
import static org.jsola.hr.example.CompanyCustomGroupingExample.E_YEARLY;
import static org.jsola.hr.example.CompanyCustomGroupingExample.M_COMPANY_IDS_MAX;
import static org.jsola.hr.example.CompanyCustomGroupingExample.M_MODULE_CODE_MAX;
import static org.jsola.hr.example.CompanyCustomGroupingExample.M_MONTHLY_NOT_NULL;
import static org.jsola.hr.example.CompanyCustomGroupingExample.M_NAME_MAX;
import static org.jsola.hr.example.CompanyCustomGroupingExample.M_YEARLY_NOT_NULL;
import static org.jsola.hr.example.CompanyCustomGroupingExample.N_COMPANY_IDS;
import static org.jsola.hr.example.CompanyCustomGroupingExample.N_MODULE_CODE;
import static org.jsola.hr.example.CompanyCustomGroupingExample.N_MONTHLY;
import static org.jsola.hr.example.CompanyCustomGroupingExample.N_NAME;
import static org.jsola.hr.example.CompanyCustomGroupingExample.N_YEARLY;

/**
 * 自定义用工单位分组
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【自定义用工单位分组】的参数")
@Data
public class CompanyCustomGroupingAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 64, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_MODULE_CODE, example = E_MODULE_CODE)
    @Length(max = 50, message = M_MODULE_CODE_MAX)
    private String moduleCode;

    @ApiModelProperty(notes = N_COMPANY_IDS, example = E_COMPANY_IDS)
    @Length(max = 2147483647, message = M_COMPANY_IDS_MAX)
    private String companyIds;

    @ApiModelProperty(notes = N_YEARLY, example = E_YEARLY, required = true)
    @NotNull(message = M_YEARLY_NOT_NULL)
    private Integer yearly;

    @ApiModelProperty(notes = N_MONTHLY, example = E_MONTHLY, required = true)
    @NotNull(message = M_MONTHLY_NOT_NULL)
    private Integer monthly;


}

